package com.hlkj.baojin.entity.enums;

/**
 * @author HULIN
 * @created with: baojin
 * @package com.hlkj.baojin.entity.enums
 * @description:
 * @date 2019/1/21 16:10
 * @modified By:
 * @Copyright © 2018 HAILIANG Info. Tech Ltd. All rights reserved.
 */
public enum DeviceTypeEnum {

    RESERVE(0, "储量"),
    TEMPERATURE(1, "温度"),
    LEAKAGE(2, "泄漏量"),
    LIQUIDLEVEL(3, "液位");

    private Integer monitorType;

    private String description;

    DeviceTypeEnum(Integer monitorType, String description) {
        this.monitorType = monitorType;
        this.description = description;
    }

    public Integer getMonitorType() {
        return monitorType;
    }

    public String getDescription() {
        return description;
    }

    public static String match(int type) {
        if(RESERVE.getMonitorType().equals(type)) {
            return RESERVE.getDescription();
        }
        if(TEMPERATURE.getMonitorType().equals(type)) {
            return TEMPERATURE.getDescription();
        }
        if(LEAKAGE.getMonitorType().equals(type)) {
            return LEAKAGE.getDescription();
        }
        if(LIQUIDLEVEL.getMonitorType().equals(type)) {
            return LIQUIDLEVEL.getDescription();
        }
        return "";
    }
}
